#!/bin/bash
# vim: fdm=marker fmr=[[[,]]] cms=\ #%s

#[[ -z $SOAR ]] && SOAR=/opt/soar
#PATH=$PATH:$SOAR/common/bash/soar
PATH=$PATH:../../soar
. soar.sh

main()
{
    echo "BIT_OF_CHAR: $BIT_OF_CHAR"

    echo "PARA_ITEM_MAX_SIZE: $PARA_ITEM_MAX_SIZE"
    local msg=''
    msg=$(para_put_item "$msg" "hello world!" "1234567890abcdefghijklmnopqrstuvwxyz")
    echo $msg
    curr=0
    while ((1))
    do
        item=$(para_get_item "$msg" $curr)
        [[ -z $item ]] && break
        echo $item
        (( curr+=$(para_item_size "$item") ))
    done
}

main $@
exit $?
